<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<div class="col-md-12">
    <div class="panel-search">
        <form class="form-inline" action="/hospitalDepartment/templateDepartmentList">
            <div class="form-group">
                <label class="control-label">一级科室(共<label id="departmentWeightOne"></label>)</label>
                <label class="control-label">二级科室(共<label id="departmentWeightTwo"></label>)</label>
            </div>
            <%--用于判断到底是后台管理还是国内医院,到底是科室管理还是模板管理--%>
            <input type="hidden" name="pageType" value="<spring:message code="hospital.template.pagyType"></spring:message>">
        </form>
        <div class="btn-div">
        </div>
    </div>
    <div class="panel-content"></div>
</div>
<script type="text/javascript" src="<c:url value="/static/custom/datepicker-util.js"></c:url>"></script>
<script type="text/javascript">
    $(function () {
        search();
        queryStatistics();
    });

    /**
     * 查询科室的统计信息
     */
    function queryStatistics(){
        $.ajax({
            type: 'post',
            url: '<c:url value="/hospitalDepartment/queryStatistics"></c:url>',
            data: null,
            dataType: 'json',
            success: function (data) {
                if(!checkResultCode(data.code)){
                    alert(data.message);
                }else {
                    $("#departmentWeightOne").text(data.data.departmentWeightOne);
                    $("#departmentWeightTwo").text(data.data.departmentWeightTwo);
                }
            }
        });
        $('#departmentModal').modal('show');
    }
</script>